﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cesave.Domain.PermisosModule.Entities;
using System.Data.Objects;
using Cesave.Infrastructure.Data.Core;

namespace Cesave.Infrastructure.Data.PermisosModule.Mock
{
	public partial class PermisosModuleFakeContext
	{
		private static List<FoliosPermiso> _foliosPermisos;

		private void InitiateInnerFoliosPermisoCollection()
		{
			if (_foliosPermisos == null)
				_foliosPermisos = new List<FoliosPermiso>
				{
					new FoliosPermiso
					{
						JuntaGuid = new Guid("C1F6907F-9F13-46EA-981E-2E6DB652AAF2"),
						CicloGuid = new Guid("ED77E3AC-1E91-44EA-9F80-C9B2619B9211"),
						AreaGuid =  new Guid("33BA88E9-4899-46F7-95C6-4F2D507DC062"),
						JuntaId = 2,
						CicloId = 1,
						AreaId = 1,
						Folio = 4,
					},
					new FoliosPermiso
					{
						JuntaGuid = new Guid("C1F6907F-9F13-46EA-981E-2E6DB652AAF2"),
						CicloGuid = new Guid("ED77E3AC-1E91-44EA-9F80-C9B2619B9211"),
						AreaGuid =  new Guid("33BA88E9-4899-46F7-95C6-4F2D507DC062"),
						JuntaId = 2,
						CicloId = 1,
						AreaId = 1,
						Folio = 337,
					},
					new FoliosPermiso
					{
						JuntaGuid = new Guid("C1F6907F-9F13-46EA-981E-2E6DB652AAF2"),
						CicloGuid = new Guid("ED77E3AC-1E91-44EA-9F80-C9B2619B9211"),
						AreaGuid =  new Guid("33BA88E9-4899-46F7-95C6-4F2D507DC062"),
						JuntaId = 2,
						CicloId = 1,
						AreaId = 3,
						Folio = 1,
					},
				};
		}

		private IObjectSet<FoliosPermiso> CreateFoliosPermisosObjectSet()
		{
			return _foliosPermisos.ToInMemoryObjectSet();
		}

		private void InitiateFakePermisosFolios()
		{
			FoliosPermisosGet = () => CreateFoliosPermisosObjectSet();
			CreateObjectSet<FoliosPermiso>(() => CreateFoliosPermisosObjectSet());
		}

	}
}